package com.swust.exam.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.swust.exam.dao.QuestionbankMapper;
import com.swust.exam.pojo.Questionbank;

@Service
public class QuestionbankService {
	@Autowired
	private QuestionbankMapper questionbankMapper;
	
	
	public Questionbank get(int id){
		return questionbankMapper.selectByPrimaryKey(id);
	} 
	
	public int delete(int id) {
		return questionbankMapper.deleteByPrimaryKey(id);
	}
	
	public int insert(Questionbank questionbank) {
		return questionbankMapper.insert(questionbank);
	}
	
	public int update(Questionbank questionbank) {
		return questionbankMapper.updateByPrimaryKey(questionbank);
	}

	public  List<Questionbank> questionbanklist() {
		return questionbankMapper.questionbanklist();
	}

}
